<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link rel="stylesheet" th:href="@{/layui-v2.6.8/css/layui.css}" href="/static/layui-v2.6.8/css/layui.css">

</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <a th:href="@{/home}" th:target="home-page"><div class="layui-logo layui-hide-xs layui-bg-black">amin</div></a>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <span th:text="${token}"></span>
        <ul class="layui-nav layui-layout-right">
           <!-- <li class="layui-nav-item">
                <a href="">控制台<span class="layui-badge">9</span></a>
            </li>
            <li class="layui-nav-item">
                <a href="">个人中心<span class="layui-badge-dot"></span></a>
            </li>-->
            <li class="layui-nav-item ">
                <a><img th:src="${user.userPicture}" class="layui-nav-img">
                <span th:text="${user.userNick}"></span></a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{'/user/createUser?id='+${user.id}}" th:target="home-page">修改信息</a></dd>
                    <dd><a href="javascript:;">安全管理</a></dd>
                    <dd><a th:href="@{/login}">退了</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test" th:each="menu:${menuList}">
                <li class="layui-nav-item" th:if="${menu.parentId == 0}">
                    <a class="" href="javascript:;"  ><span th:text="${menu.menuName}"></span><i class="layui-icon layui-icon-down layui-nav-more"></i></a>
                    <dl class="layui-nav-child" th:each="cmenu:${menuList}" th:if="${menu.id == cmenu.parentId}">
                        <dd><a th:href="@{${cmenu.menuHref}}" th:target="${cmenu.openType}" th:text="${cmenu.menuName}">menu 1</a></dd>
                       <!-- <dd><a th:href="@{/role/getRoleList}" th:target="home-page">menu 2</a></dd>
                        <dd><a th:href="@{/user/getUserList}" th:target="home-page">menu 3</a></dd>-->
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
       <iframe th:src="@{/home}" style="width: 100%;height: 100%;" name="home-page"></iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        xiaoming@hahah.com
    </div>
</div>
</body>
<!-- 引入 layui.js -->
<script th:src="@{/layui-v2.6.8/layui.js}" src="/static/layui-v2.6.8/layui.js"></script>
<script>
    layui.use(function(){
        var layer = layui.layer
            ,form = layui.form;
        //layer.msg('Hello World');
        //监听提交
        form.on('submit(formDemo)', function(data){
            //layer.msg(JSON.stringify(data.field));
            return true;
        });
    });
</script>
</html>